package net.orange.framework.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import net.orange.architecture.model.BaseValueObject;

/**
 * The system calendar which define the date & holiday.
 */
@Entity
@Table(name = "t_calendar")
public class Calendar extends BaseValueObject {

	private static final long serialVersionUID = 6789003490181443335L;

	/**
	 * The date
	 */
	@Column(name = "cdate")
	public Date date;

	/**
	 * The year of the date
	 */
	@Column(name = "cyear")
	public int year;

	/**
	 * The month of the date
	 */
	@Column(name = "cmonth")
	public int month;

	/**
	 * The day of the date
	 */
	@Column(name = "cday")
	public int day;

	/**
	 * The week of the date.
	 */
	@Column(name = "cweek")
	public int week;

	/**
	 * Whether is holiday
	 */
	@Column(name = "holiday")
	public boolean holiday;

	/**
	 * The notes
	 */
	@Column(name = "notes")
	public String notes;

	/**
	 * The default constructor
	 */
	public Calendar() {

	}

	/**
	 * @return the date
	 */
	public Date getDate() {
		return date;
	}

	/**
	 * @param date
	 *            the date to set
	 */
	public void setDate(Date date) {
		this.date = date;
	}

	/**
	 * @return Returns the day.
	 */
	public int getDay() {
		return day;
	}

	/**
	 * @param day
	 *            The day to set.
	 */
	public void setDay(int day) {
		this.day = day;
	}

	/**
	 * @return Returns the holiday.
	 */
	public boolean isHoliday() {
		return holiday;
	}

	/**
	 * @param holiday
	 *            The holiday to set.
	 */
	public void setHoliday(boolean holiday) {
		this.holiday = holiday;
	}

	/**
	 * @return Returns the month.
	 */
	public int getMonth() {
		return month;
	}

	/**
	 * @param month
	 *            The month to set.
	 */
	public void setMonth(int month) {
		this.month = month;
	}

	/**
	 * @return Returns the notes.
	 */
	public String getNotes() {
		return notes;
	}

	/**
	 * @param notes
	 *            The notes to set.
	 */
	public void setNotes(String notes) {
		this.notes = notes;
	}

	/**
	 * @return Returns the week.
	 */
	public int getWeek() {
		return week;
	}

	/**
	 * @param week
	 *            The week to set.
	 */
	public void setWeek(int week) {
		this.week = week;
	}

	/**
	 * @return Returns the year.
	 */
	public int getYear() {
		return year;
	}

	/**
	 * @param year
	 *            The year to set.
	 */
	public void setYear(int year) {
		this.year = year;
	}
}
